//
//  LeRigidBody.cpp
//  Leste
//
//  Created by 王乐 on 2022/1/26.
//

#include "LeRigidBody.h"

#include "LePhysicsWorld.h"

LeRigidBody::LeRigidBody() {
}

LeRigidBody::~LeRigidBody() {
}

void LeRigidBody::initRigidBody(const b2BodyDef &bodydef, const b2FixtureDef &fixtdef)
{
    m_Body = LePhysicsWorld::world.CreateBody(&bodydef);
    m_Body->CreateFixture(&fixtdef);
}

void LeRigidBody::destroyRigidBody()
{
    LePhysicsWorld::world.DestroyBody(m_Body);
}

